<template>
  <view class="card-wrap" :style="{ width, height }">
    <view class="title">{{ title }}</view>
    <slot></slot>
  </view>
</template>

<script lang="ts" setup>
defineProps({
  title: { type: String, default: '暂无标题' },
  width: { type: String, default: '100%' },
  height: { type: String, default: '100%' }
})
</script>

<style lang="scss" scoped>
.card-wrap {
  padding: 24rpx 32rpx;
  box-sizing: border-box;
  background-color: #fff;
  border-radius: 12rpx;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.03);

  .title {
    margin-bottom: 24rpx;
    font-size: 28rpx;
    color: #424242;
    font-weight: bold;
  }
}
</style>